# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=go-httputils
_pkgname=httputils
_vendor="strukturag"
pkgver=012
pkgrel=2
pkgdesc="Go support library for HTTP servers"
url="https://github.com/$_vendor/$_pkgname"
arch="noarch"
license="BSD-3-Clause"
depends="go"
subpackages="$pkgname-doc"
options="!check" # no testsuite
source="$pkgname-$pkgver.tar.gz::https://github.com/strukturag/$_pkgname/archive/${_pkgname}_v$pkgver.tar.gz"
builddir="$srcdir"/${_pkgname}-${_pkgname}_v$pkgver

build() {
	return 0
}

package() {
	cd "$builddir"
	mkdir -p "$pkgdir"/usr/share/doc/$_vendor/$pkgname \
		"$pkgdir"/usr/lib/go/src/github.com/$_vendor/$_pkgname
	for file in \
		LICENSE \
		README.* \
		COPYRIGHT \
		AUTHORS \
		; do \
		test -e $file && mv $file "$pkgdir"/usr/share/doc/$_vendor/$_pkgname
	done
	mv * "$pkgdir"/usr/lib/go/src/github.com/$_vendor/$_pkgname
}

sha512sums="e508c121f6b226dcc8f7eea2104e3bf620ada5c8d66e5569cb3e6f33f95d7ce5cac97f4e1b34afb34fc13e280ec9e3ea846b408412ddf3badcfb70674a328d84  go-httputils-012.tar.gz"
